#include "HighScoreState.h"

#include "TitleState.h"
#include "../items/ChangeStateButton.h"

HighScoreState* HighScoreState::theHighScoreState = NULL;

HighScoreState::HighScoreState(Frame *aFrame) {
    this->theTitle = "High Scores";
	this->theFrame = aFrame;
}

HighScoreState::~HighScoreState() {
}

void HighScoreState::populate() {
	ChangeStateButton *toTitle = new ChangeStateButton('2', "Back", TitleState::getInstance(this->theFrame));
    this->theItems.push_back(toTitle);
}

HighScoreState& HighScoreState::getInstance(Frame *aFrame) {
	if(HighScoreState::theHighScoreState == NULL) {
		HighScoreState::theHighScoreState = new HighScoreState(aFrame);
		HighScoreState::theHighScoreState->populate();
		aFrame->insertState(HighScoreState::theHighScoreState);
	}
    return *HighScoreState::theHighScoreState;
}
